import * as React from 'react';
import type { onSelectType } from './types';
import './index.module.scss';
const { memo } = React;

interface AlphaIndexProps {
  alpha: string;
  onClick: onSelectType;
}
function AlphaIndex(props: AlphaIndexProps) {
  const { alpha, onClick } = props;

  return (
    <i styleName="city-index-item" onClick={() => onClick(alpha)}>
      {alpha}
    </i>
    // <a styleName="city-index-item" href={`#${alpha}`}>
    //   {alpha}
    // </a>
  );
}
export default memo(AlphaIndex);
